<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head th:replace="~{fragments/header :: header}">
</head>
<body>
<div class="container">

    <div class="mt-3">
        <h2 th:text="${userModel.title}">Welcome to waylau.com</h2>
    </div>

    <table class="table table-hover">
        <thead>
        <tr>
            <td>Age</td>
            <td>Name</td>
            <td sec:authorize="hasRole('ADMIN')">Operation</td>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${userModel.userList.size()} eq 0">
            <td colspan="3">没有用户信息！！</td>
        </tr>
        <tr th:each="user : ${userModel.userList}">

            <td th:text="${user.age}">11</td>
            <td th:text="${user.name}">waylau</a></td>
            <td sec:authorize="hasRole('ADMIN')">
                <div >
                    我是管理员
                </div>
            </td>
        </tr>
        </tbody>
    </table>

</div><!-- /.container -->

<div th:replace="~{fragments/footer :: footer}">...</div>

</body>
</html>